package com.catering.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName d_dishes
 */
@TableName(value ="d_dishes")
@Data
public class DDishes implements Serializable {
    /**
     * 菜品ID
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 菜品名称
     */
    private String name;

    /**
     * 口味ID
     */
    private Integer fid;

    /**
     * 菜品价格
     */
    private BigDecimal price;

    /**
     * 类别ID
     */
    private Integer categoriesId;

    /**
     * 状态默认0（0：在售/1：停售）
     */
    private Integer status;

    /**
     * 规格ID
     */
    private Integer sizesId;

    /**
     * 菜品图片
     */
    private String img;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DDishes other = (DDishes) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getFid() == null ? other.getFid() == null : this.getFid().equals(other.getFid()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getCategoriesId() == null ? other.getCategoriesId() == null : this.getCategoriesId().equals(other.getCategoriesId()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getSizesId() == null ? other.getSizesId() == null : this.getSizesId().equals(other.getSizesId()))
            && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getFid() == null) ? 0 : getFid().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getCategoriesId() == null) ? 0 : getCategoriesId().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getSizesId() == null) ? 0 : getSizesId().hashCode());
        result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", fid=").append(fid);
        sb.append(", price=").append(price);
        sb.append(", categoriesId=").append(categoriesId);
        sb.append(", status=").append(status);
        sb.append(", sizesId=").append(sizesId);
        sb.append(", img=").append(img);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}